<template>
    <div>
      <div class="row">
        <div style="flex-shrink: 0;font-size: 14px;">序号：</div><el-input size="mini" style="width: 60px;margin-right: 20px;" v-model="nodeModel.sort"></el-input>
        <div style="flex-shrink: 0;font-size: 14px;">是否显示：</div><el-switch v-model="nodeModel.isShow" :active-value="true" :inactive-value="false" active-color="#13ce66" inactive-color="#999999"></el-switch>
        <div style="margin-left: 20px;">
            <el-button @click="selectTemplate" size="mini">选用模版</el-button>
          </div>
      </div>
      <div class="row">
          <div style="flex-shrink: 0;font-size: 14px;">背景色：</div>
          <el-input size="mini" style="width: 100px;"  v-model="nodeModel.configDict.componentStyle.background"></el-input>
          <el-color-picker v-model="nodeModel.configDict.componentStyle.background"></el-color-picker>
      </div>
      <div class="column">
        <div style="flex-shrink: 0;font-size: 14px;font-weight: bold;">左侧按钮：</div>
        <div class="row">
          <div style="flex-shrink: 0;font-size: 14px;">是否显示：</div>
          <el-radio v-model="nodeModel.configDict.componentStyle.isShowForBtn1" :label='true'>是</el-radio>
          <el-radio v-model="nodeModel.configDict.componentStyle.isShowForBtn1" :label='false'>否</el-radio>
        </div>
        <div class="row">
          <div style="flex-shrink: 0;font-size: 14px;">颜色：</div>
          <el-input size="mini" style="width: 100px;"  v-model="nodeModel.configDict.componentStyle.colorForBtn1"></el-input>
          <el-color-picker v-model="nodeModel.configDict.componentStyle.colorForBtn1"></el-color-picker>
        </div>
        <div class="row">
          <div style="flex-shrink: 0;font-size: 14px;">选择图标：</div>
          <div style="width: 100%;"><el-input style="margin-left: 0px;" v-model="nodeModel.configDict.coverUrl"></el-input></div>
          <custom :model="nodeModel.configDict" buttonTitle="选择文件"></custom>
        </div>
        <div class="row">
          <div style="flex-shrink: 0;font-size: 14px;">选择路由：</div>
          <div style="width: 100%;"><el-input style="margin-left: 0px;" v-model="nodeModel.configDict.query"></el-input></div>
          <div><el-button @click="selectRoute(nodeModel.configDict)">路由参数</el-button></div>
        </div>
        <div>
          <jcSlider title="字体大小：" :titleWidth="70"><el-slider slot="slider" v-model="nodeModel.configDict.componentStyle.fontsizeForBtn1" :min="10" :max="100" show-input input-size="mini"></el-slider></jcSlider>
        </div>
      </div>
      <div class="column">
        <div style="flex-shrink: 0;font-size: 14px;font-weight: bold;">标题样式：</div>
        <div class="row">
            <div style="flex-shrink: 0;font-size: 14px;margin-right: 10px;">标题：</div><el-input size="mini" style="width: 120px;margin-right: 20px;"  v-model="nodeModel.configDict.componentStyle.titleForText1"></el-input>
        </div>
        <div class="row">
          <div style="flex-shrink: 0;font-size: 14px;">是否显示：</div>
          <el-radio v-model="nodeModel.configDict.componentStyle.isShowForText1" :label='true'>是</el-radio>
          <el-radio v-model="nodeModel.configDict.componentStyle.isShowForText1" :label='false'>否</el-radio>
          <div style="flex-shrink: 0;font-size: 14px;">是否加粗：</div>
          <el-radio v-model="nodeModel.configDict.componentStyle.fontweightForText1" label='bold'>是</el-radio>
          <el-radio v-model="nodeModel.configDict.componentStyle.fontweightForText1" label=''>否</el-radio>
        </div>
        <div class="row" style="margin-left: 50px;">
          <div style="flex-shrink: 0;font-size: 14px;">颜色：</div>
          <el-input size="mini" style="width: 100px;"  v-model="nodeModel.configDict.componentStyle.colorForText1"></el-input>
          <el-color-picker v-model="nodeModel.configDict.componentStyle.colorForText1"></el-color-picker>
        </div>
      </div>
    </div>
</template>

<script>
    import custom from '@/components/jcupload/custom'
    import jcSlider from '@/views/interface/composing/components/jc-slider'
  export default {
    components: {
        custom,
        jcSlider
    },
    props:{
      nodeModel:{
        type: Object,
        default: res=>{}
      }
    },
    data() {
      return {

      }
    },
    methods:{
        insertAdvert(){
            this.$emit('insertAdvert', {name: this.nodeModel.componentModel.name})
        },
        deleteAdvert(index){
            this.$emit('deleteAdvert', index)
        },
        selectRoute(item){
            this.$emit('selectRoute', item)
        },
        selectTemplate(){
          this.$emit('selectTemplate')
        },
    }
  }
</script>

<style lang="scss" scoped>
  @import './commonStyle.scss';
</style>